
package com.platform.modules.bk.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 客户号对应数据实体
 *
 * @author
 * @date 2022-03-14 16:04:07
 */
@Data
@TableName("BK_CUSTOMER")
public class BkCustomerEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 客户号
     */
    @TableId
    private String customerNo;
    /**
     * 客户名称
     */
    private String custName;
    /**
     * 证件号后四位
     */
    private String identNo;
    /**
     * 联系人电话
     */
    private String linkmanTel;
    /**
     * 创建机构编码
     */
    private String createBranchNo;
    /**
     * 有效积分
     */
    private BigDecimal availablePoints;
    /**
     * 激活时间
     */
    private Date activationTime;

    @Override
    public boolean equals(Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof BkCustomerEntity)) {
            return false;
        } else {
            BkCustomerEntity other = (BkCustomerEntity) o;
            if (this.getCustomerNo() == null || this.getCustomerNo().equals("")) {
                return false;
            }
            return this.getCustomerNo().equals(other.getCustomerNo());
        }
    }

    @Override
    public int hashCode() {
        return this.getCustomerNo().hashCode();
    }
}
